package com.trade.data.type;


public enum OptionTypes{
	CE(1,"CE","Call"),
	PE(2,"PE","Put");

	int id;
	String name;
	String description;

	OptionTypes(int id , String name,String desc){
		this.id = id;
		this.name = name;
		this.description = desc;
	}

	public String getName(){
		return this.name;
	}

	public static OptionTypes getByValue( String name){
		for(OptionTypes optionType : OptionTypes.values()){
			if( optionType.getName().equals(name)){
				return optionType;
			}
		}

		return null;
	}

}